<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui"
                template="/templates/ui.xhtml">
    <ui:define name="head">
        <link type="text/css" href="#{request.contextPath}/UI/epss/epss.css" rel="stylesheet"/>
        <script type="text/javascript" src="#{request.contextPath}/UI/support/pub.js"/>
        <script type="text/javascript" language="javascript">
            document.onkeydown = function TabReplace() {
                if (event.keyCode == 13) {
                    if (event.srcElement.tagName != 'BUTTON')
                        event.keyCode = 9;
                    else
                        event.srcElement.click();
                }
            }
        </script>
    </ui:define>
    <ui:define name="content">
        <h:form id="form" enctype="multipart/form-data">
            <p:growl id="msgs" showDetail="false"/>
            <h:panelGrid id="pgCondition">
                <h:panelGrid columns="4">
                    <h:outputLabel value="工程名称：" for="id"/>
                    <p:inputText id="id" value="#{cttDSubPStlAction.cttHTkCstplSub.strTkcttName}"
                                 readonly="true"
                                 style="background-color:gainsboro;width:500px;"/>
                    <h:outputLabel value="结算单编号：" for="strStlId"/>
                    <p:inputText id="strStlId" value="#{cttDSubPStlAction.cttHTkCstplSub.strStlId}"
                                 readonly="true"
                                 style="background-color:gainsboro;width:200px;"/>
                    <h:outputLabel value="工程项目：" for="strSubcttName"/>
                    <p:inputText id="strSubcttName" value="#{cttDSubPStlAction.cttHTkCstplSub.strSubcttName}"
                                 readonly="true"
                                 style="background-color:gainsboro;width:500px;"/>
                    <h:outputLabel value="协作合同编号：" for="strSubcttId"/>
                    <p:inputText id="strSubcttId" value="#{cttDSubPStlAction.cttHTkCstplSub.strSubcttId}"
                                 readonly="true"
                                 style="background-color:gainsboro;width:200px;"/>
                    <h:outputLabel value="协作队伍：" for="strSignPartName"/>
                    <p:inputText id="strSignPartName" value="#{cttDSubPStlAction.cttHTkCstplSub.strSignPartName}"
                                 readonly="true"
                                 style="background-color:gainsboro;width:500px;"/>
                    <h:outputLabel value="日期：" for="strDate"/>
                    <p:inputText id="strDate" value="#{cttDSubPStlAction.cttHTkCstplSub.strDate}"
                                 readonly="true"
                                 style="background-color:gainsboro;width:200px;"/>
                </h:panelGrid>
                <h:panelGrid columns="2">
                    <p:commandButton value="导出到EXCEL"
                                     action="#{cttDSubPStlAction.onExportExcel}"
                                     ajax="false"
                                     rendered="#{cttDSubPStlAction.strExportToExcelRendered}">
                    </p:commandButton>
                    <p:ajaxStatus style="width:16px;height:16px;">
                        <f:facet name="start">
                            <h:graphicImage value="/images/ajaxloading.gif"/>
                        </f:facet>
                        <f:facet name="complete">
                            <h:outputText value=""/>
                        </f:facet>
                    </p:ajaxStatus>
                </h:panelGrid>
            </h:panelGrid>
            <p:dataTable id="pdt" style="heiht:100%;width:100%;"
                     value="#{cttDSubPStlAction.rowCttDSubPStlList}"
                     var="record"
                     rowKey="#{record.subctt_Pkid}"
                     selectionMode="single"
                     paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks}
                     {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                     paginator="true"
                     paginatorPosition="bottom"
                     rows="15"
                     rowsPerPageTemplate="500,200,90,45,30,15"
                     rowIndexVar="row"
                     emptyMessage="数据记录为空..."
                     widgetVar="dtItemDetail"
                     rowStyleClass="#{record.subctt_Name eq '小计'? 'rowDoneStyle':
                                         record.subctt_Name eq '本期净结算额'? 'rowTotalStyle':
                                         record.subctt_Name eq '合计(扣除其它栏款项后本期结算价值)'?'rowTotalStyle':
                                         record.subctt_Name eq '其中:安全施工措施费'?'rowDoneStyle':
                                         record.subctt_Name eq '质保金'? 'rowTotalStyle':null}"
                     scrollable="true"
                     scrollHeight="420">
                <p:column headerText="序号" style="width:30px">
                    <h:outputText value="#{row + 1}"/>
                </p:column>
                <p:column headerText="编号" style="width:100px">
                    <h:outputText value="#{record.subctt_StrNo}" escape="false"/>
                </p:column>
                <p:column headerText="分项项目名称" style="width:200px">
                    <h:outputText value="#{record.subctt_Name}" />
                </p:column>
                <p:column headerText="单位" style="width:60px">
                    <h:outputText value="#{record.subctt_Unit}" style="text-align:right"/>
                </p:column>
                <p:column headerText="合同单价" style="width:100px">
                    <h:outputText value="#{record.subctt_ContractUnitPrice}" style="float: right" >
                        <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                    </h:outputText>
                </p:column>
                <p:column headerText="合同数量" style="width:100px">
                    <h:outputText value="#{record.subctt_ContractQuantity}" style="float: right" >
                        <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                    </h:outputText>
                </p:column>
                <p:column headerText="合同金额" style="width:100px">
                    <h:outputText value="#{record.subctt_ContractAmount}" style="float: right" >
                        <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                    </h:outputText>
                </p:column>
                <p:column headerText="本期_数量" style="width:100px">
                    <h:outputText value="#{record.engPMng_CurrentPeriodEQty}" style="float: right">
                        <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                    </h:outputText>
                </p:column>
                <p:column headerText="本期_金额" style="width:100px">
                    <h:outputText value="#{record.engPMng_CurrentPeriodAmt}" style="float: right">
                        <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                    </h:outputText>
                </p:column>
                <p:column headerText="开累_数量" style="width:100px">
                    <h:outputText value="#{record.engPMng_BeginToCurrentPeriodEQty}" style="float: right">
                        <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                    </h:outputText>
                </p:column>
                <p:column headerText="开累_金额" style="width:100px">
                    <h:outputText value="#{record.engPMng_BeginToCurrentPeriodAmt}" style="float: right">
                        <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                    </h:outputText>
                </p:column>
                <p:column headerText="备注内容" style="width:200px">
                    <h:outputText value="#{record.subctt_Note}" />
                </p:column>
            </p:dataTable>
        </h:form>
    </ui:define>
</ui:composition>